"""
RDF 中的各前缀
@Time: 2020/10/23 8:44
@Author:
@File: rdf_prefix.py
"""

from enum import Enum, unique
import rdflib
from rdflib import Namespace


COMMON_PREFIX = 'http://www.inet.com/kg/ontoligies/ifa#'   # 本体的共有前缀
ifa = Namespace(COMMON_PREFIX)

@unique
class RdfPrefix(Enum):
    """
    RDF三元组中的@prefix枚举
    用于向graph中bind前缀，该枚举的name为前缀，value为其对应的包装了IRI的URIRef或Namespace对象
    """

    # ----------  Classes ---------- #
    BrandProject = Namespace(COMMON_PREFIX + 'BrandProject/')
    Event = Namespace(COMMON_PREFIX + 'Event/')
    Firm = Namespace(COMMON_PREFIX + 'Firm/')




    # ---------- Datatypes ---------- #
    owl = rdflib.namespace.OWL
    xsd = rdflib.namespace.XSD
    rdf = rdflib.namespace.RDF
    rdfs = rdflib.namespace.RDFS


    # ---------- Test ---------- #
    dc = '<http://purl.org/dc/elements/1.1/>'